<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>ObjectWeb ASM</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/ObjectWeb_ASM"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-ObjectWeb_ASM rootpage-ObjectWeb_ASM skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">ObjectWeb ASM</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><style data-mw-deduplicate="TemplateStyles:r1295905060">
/* start https://en.wikipedia.org/ */
.mw-parser-output .infobox-subbox{padding:0;border:none;margin:-3px;width:auto;min-width:100%;font-size:100%;clear:none;float:none;background-color:transparent}.mw-parser-output .infobox-3cols-child{margin:auto}.mw-parser-output .infobox .navbar{font-size:100%}@media screen{html.skin-theme-clientpref-night .mw-parser-output .infobox-full-data:not(.notheme)>div:not(.notheme)[style]{background:#1f1f23!important;color:#f8f9fa}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .infobox-full-data:not(.notheme)>div:not(.notheme)[style]{background:#1f1f23!important;color:#f8f9fa}}@media(min-width:640px){body.skin--responsive .mw-parser-output .infobox-table{display:table!important}body.skin--responsive .mw-parser-output .infobox-table>caption{display:table-caption!important}body.skin--responsive .mw-parser-output .infobox-table>tbody{display:table-row-group}body.skin--responsive .mw-parser-output .infobox-table th,body.skin--responsive .mw-parser-output .infobox-table td{padding-left:inherit;padding-right:inherit}}
/* end https://en.wikipedia.org/ */
</style><table class="infobox vevent"><tbody><tr><th colspan="2" class="infobox-above summary">ASM</th></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Programmer" title="Programmer">Original author(s)</a></th><td class="infobox-data">Eric Bruneton</td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Programmer" title="Programmer">Developer(s)</a></th><td class="infobox-data"><a href="OW2" title="OW2">OW2</a></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;">Initial release</th><td class="infobox-data">2002<span style="display:none"> (<span class="bday dtstart published updated">2002</span>)</span></td></tr><tr style="display: none;"><td colspan="2" class="infobox-full-data"></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Software_release_life_cycle" title="Software release life cycle">Stable release</a></th><td class="infobox-data"><div style="margin:0px;">9.7.1
/ October 6, 2024<span style="display:none"> (<span class="bday dtstart published updated">2024-10-06</span>)</span></div></td></tr><tr style="display:none"><td colspan="2">
</td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Repository_(version_control)" title="Repository (version control)">Repository</a></th><td class="infobox-data"><style data-mw-deduplicate="TemplateStyles:r1126788409">
/* start https://en.wikipedia.org/ */
.mw-parser-output .plainlist ol,.mw-parser-output .plainlist ul{line-height:inherit;list-style:none;margin:0;padding:0}.mw-parser-output .plainlist ol li,.mw-parser-output .plainlist ul li{margin-bottom:0}
/* end https://en.wikipedia.org/ */
</style><div class="plainlist"><ul><li><span class="url"><a rel="nofollow" class="external text" href="https://gitlab.ow2.org/asm/asm.git">gitlab<wbr>.ow2<wbr>.org<wbr>/asm<wbr>/asm<wbr>.git</a></span> </li></ul>
</div></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;">Written in</th><td class="infobox-data"><a href="Java_(programming_language)" title="Java (programming language)">Java</a></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Operating_system" title="Operating system">Operating system</a></th><td class="infobox-data"><a href="Cross-platform" class="mw-redirect" title="Cross-platform">Cross-platform</a></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Software_categories#Categorization_approaches" title="Software categories">Type</a></th><td class="infobox-data"><a href="Bytecode" title="Bytecode">bytecode</a> Engineering Library</td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Software_license" title="Software license">License</a></th><td class="infobox-data"><a href="BSD_License" class="mw-redirect" title="BSD License">BSD License</a></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;">Website</th><td class="infobox-data"><span class="url"><a rel="nofollow" class="external text" href="https://asm.ow2.io/">asm<wbr>.ow2<wbr>.io</a></span> </td></tr></tbody></table>
<p>The <b>ASM</b> library is a project of the <a href="OW2" title="OW2">OW2</a> consortium. It provides a simple API for decomposing, modifying, and recomposing binary Java classes (i.e. <a href="Bytecode" title="Bytecode">bytecode</a>). The project was originally conceived and developed by Eric Bruneton. ASM is Java-centric at present, and does not currently have a backend that exposes other bytecode implementations (such as <a href=".NET_Framework" title=".NET Framework">.NET</a> bytecode, <a href="Python_(programming_language)" title="Python (programming language)">Python</a> bytecode, etc.).
</p><p>The name "ASM" is not an acronym: it is just a reference to the <a href="Inline_assembler" title="Inline assembler">asm</a> keyword of C, which allows some functions to be implemented in assembly language.<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Uses">Uses</h2></div>
<p>ASM provides a simple library that exposes the internal aggregate components of a given Java class through its <a href="Visitor_pattern" title="Visitor pattern">visitor</a> oriented API. ASM also provides, on top of this visitor API, a tree API that represents classes as object constructs. Both APIs can be used for modifying the binary bytecode, as well as generating new bytecode (via injection of new code into the existing code, or through generation of new classes altogether.) The ASM library has been used in several diverse applications, such as:
</p>
<dl><dt>Performance and Profiling</dt>
<dd>Instrumentation calls that capture performance metrics can be injected into Java class binaries to examine memory/coverage data. (For example, injecting instrumentation at entry/exit points.)</dd>
<dt>Implementation of New Language Semantics</dt>
<dd>For example, <a href="Groovy_(programming_language)" class="mw-redirect" title="Groovy (programming language)">Groovy</a> uses ASM to generate its bytecode. Also, <a href="Aspect_oriented_programming" class="mw-redirect" title="Aspect oriented programming">Aspect-Oriented</a> additions to the Java language have been implemented by using ASM to decompose class structures for point-cut identification, and then again when reconstituting the class by injecting aspect-related code back into the binary. (See: <a href="AspectWerkz" class="mw-redirect" title="AspectWerkz">AspectWerkz</a>)</dd></dl>
<div class="mw-heading mw-heading3"><h3 id="Invokedynamic">Invokedynamic</h3></div>
<style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */
.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}
/* end https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable">See also: <a href="Da_Vinci_Machine" title="Da Vinci Machine">Da Vinci Machine</a></div>
<p>Since version 3.2, <b>ASM</b> has added support for the new <code>invokedynamic</code> code, which allows method invocation relying on dynamic <a href="Type_system#Type_checking" title="Type system">type checking</a> on the latest <a href="JDK_7" class="mw-redirect" title="JDK 7">JDK 7</a> binaries, thus easing support for <a href="Type_system#Dynamic_typing" title="Type system">dynamically typed languages</a>.<sup id="cite_ref-invokedynamic_2-0" class="reference"><a href="#cite_note-invokedynamic-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Release_history">Release history</h2></div>
<p>This table presents only releases with significant steps in ObjectWeb ASM history, aside from versions that mainly fixed bugs and improved performance.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup>
</p>
<table class="wikitable">
<tbody><tr>
<th width="60">Release
</th>
<th width="110">Release Date
</th>
<th width="500">Highlights
</th></tr>
<tr>
<td>2.0</td>
<td>2005-05-17</td>
<td>Java 5 language support
</td></tr>
<tr>
<td>3.2</td>
<td>2009-06-11</td>
<td>support for the new <code>invokedynamic</code> code.<sup id="cite_ref-invokedynamic_2-1" class="reference"><a href="#cite_note-invokedynamic-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td>4.0</td>
<td>2011-10-29</td>
<td>Java 7 language support
</td></tr>
<tr>
<td>5.0</td>
<td>2014-03-16</td>
<td>Java 8 language support
</td></tr>
<tr>
<td>6.0</td>
<td>2017-09-23</td>
<td>Codebase migrated to Gitlab<br>Java 9 language support
</td></tr>
<tr>
<td>6.1</td>
<td>2018-03-11</td>
<td>Java 10 language support
</td></tr>
<tr>
<td>7.0</td>
<td>2018-10-27</td>
<td>Java 11 language support
</td></tr>
<tr>
<td>7.1</td>
<td>2019-03-03</td>
<td>Java 13 language support
</td></tr>
<tr>
<td>8.0</td>
<td>2020-03-28</td>
<td>Java 14 language support
</td></tr>
<tr>
<td>9.0</td>
<td>2020-09-22</td>
<td>Java 16 language support
</td></tr>
<tr>
<td>9.1</td>
<td>2021-02-06</td>
<td>Java 17 language support
</td></tr>
<tr>
<td>9.2</td>
<td>2021-06-20</td>
<td>Java 18 language support
</td></tr>
<tr>
<td>9.3</td>
<td>2022-04-03</td>
<td>Java 19 language support, new Maven BOM
</td></tr>
</tbody></table>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="Byte_Code_Engineering_Library" title="Byte Code Engineering Library">Byte Code Engineering Library</a></li>
<li>Javassist</li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */
.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}
/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */
.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}
/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFBrunetonLengletCoupaye2002" class="citation web cs1">Bruneton, Éric; Lenglet, Romain; Coupaye, Thierry (2002). <a rel="nofollow" class="external text" href="https://citeseerx.ist.psu.edu/pdf/5f4da1df76b8878bf8358ec24d6592a8008d2b0d">"ASM: a code manipulation tool to implement adaptable systems"</a>. FranceTélécom R&D, DTL/ASR. <a href="CiteSeerX_(identifier)" class="mw-redirect" title="CiteSeerX (identifier)">CiteSeerX</a> <span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.117.5769">10.1.1.117.5769</a></span><span class="reference-accessdate">. Retrieved <span class="nowrap">August 23,</span> 2023</span>.</cite></span>
</li>
<li id="cite_note-invokedynamic-2"><span class="mw-cite-backlink">^ <a href="#cite_ref-invokedynamic_2-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-invokedynamic_2-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFForax2009" class="citation web cs1">Forax, Remi (2009-06-11). <a rel="nofollow" class="external text" href="http://weblogs.java.net/blog/forax/#011890">"ASM now supports invokedynamic"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2009-11-14</span></span>.</cite></span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://asm.ow2.org/history.html#11_June_2009:_ASM_3.2_(cvs-tag:_ASM_3_2)">"11 June 2009: ASM 3.2 (cvs-tag: ASM_3_2)"</a>. ObjectWeb. 2009-06-11<span class="reference-accessdate">. Retrieved <span class="nowrap">2009-11-14</span></span>.</cite></span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://asm.ow2.io/versions.html">"Versions"</a>. ObjectWeb<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-06-06</span></span>.</cite></span>
</li>
</ol></div></div>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<ul><li><span class="official-website"><span class="url"><a rel="nofollow" class="external text" href="https://asm.ow2.io/">Official website</a></span></span> </li>
<li><a rel="nofollow" class="external text" href="https://www.ow2.org/">OW2 Home</a> - The OW2 Consortium Home Page.</li>
<li><a rel="nofollow" class="external text" href="https://web.archive.org/web/20060706114810/http://aspectwerkz.codehaus.org/">AspectWerkz</a> - The AspectWerkz Project Home Page. (One of the high-visibility projects that makes use of ASM.)</li>
<li><a rel="nofollow" class="external text" href="https://web.archive.org/web/20130618025348/http://www.drgarbage.com/bytecode-visualizer.html">Bytecode Visualizer - free Eclipse plugin for viewing and debugging Java bytecode which makes use of ASM library</a></li></ul></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-02-05" href="https://en.wikipedia.org/wiki/?title=ObjectWeb_ASM&oldid=1274119934">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
</body></html>